package kr.saeildamil.androidstudy;

import kr.saeildamil.androidstudy.ch04.Ch04Main;
import kr.saeildamil.androidstudy.ch05.Ch05Main;
import kr.saeildamil.androidstudy.ch06.Ch06Main;
import kr.saeildamil.androidstudy.ch07.Ch07Main;
import kr.saeildamil.androidstudy.ch08.Ch08Main;
import kr.saeildamil.androidstudy.ch09.Ch09Main;
import kr.saeildamil.androidstudy.ch11.Ch11Main;
import kr.saeildamil.androidstudy.ch12.Ch12Main;
import kr.saeildamil.androidstudy.ch13.Ch13Main;
import kr.saeildamil.androidstudy.ch14.Ch14Main;
import kr.saeildamil.androidstudy.ch16.Ch16Main;
import kr.saeildamil.androidstudy.ch17.Ch17Main;
import kr.saeildamil.androidstudy.ch18.Ch18Main;
import kr.saeildamil.androidstudy.ch19.Ch19Main;
import kr.saeildamil.androidstudy.example02.AddActivity;
import kr.saeildamil.androidstudy.example02.ButtonEventEx;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	public void mOnClick(View v){
		switch(v.getId()){
		case R.id.main_ch04_btn:
			startActivity(new Intent(this, Ch04Main.class));
			break;
		case R.id.main_ch05_btn:
			startActivity(new Intent(this, Ch05Main.class));
			break;
		case R.id.main_ch06_btn:
			startActivity(new Intent(this, Ch06Main.class));
			break;
		case R.id.main_ch07_btn:
			startActivity(new Intent(this, Ch07Main.class));
			break;
		case R.id.main_ch08_btn:
			startActivity(new Intent(this, Ch08Main.class));
			break;
		case R.id.main_ch09_btn:
			startActivity(new Intent(this, Ch09Main.class));
			break;
		case R.id.main_ch11_btn:
			startActivity(new Intent(this, Ch11Main.class));
			break;
		case R.id.main_ch12_btn:
			startActivity(new Intent(this, Ch12Main.class));
			break;
		case R.id.main_ch13_btn:
			startActivity(new Intent(this, Ch13Main.class));
			break;
		case R.id.main_ch14_btn:
			startActivity(new Intent(this, Ch14Main.class));
			break;
		case R.id.main_ch16_btn:
			startActivity(new Intent(this, Ch16Main.class));
			break;
		case R.id.main_ch17_btn:
			startActivity(new Intent(this, Ch17Main.class));
			break;
		case R.id.main_ch18_btn:
			startActivity(new Intent(this, Ch18Main.class));
			break;
		case R.id.main_ch19_btn:
			startActivity(new Intent(this, Ch19Main.class));
			break;
		case R.id.main_ch20_btn:
			startActivity(new Intent(this, ButtonEventEx.class));
			break;
		case R.id.main_ch21_btn:
			startActivity(new Intent(this, AddActivity.class));
			break;
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
